

package com.hazelcast.map.impl.mapstore.writebehind.entry;

import com.hazelcast.map.MapStore;

import java.util.UUID;

/**
 * Represents a candidate entry to be
 * deleted from {@link MapStore} witih a txn
 *
 * @param <K> the key type.
 * @param <V> the value type.
 */
class TxnDeletedDelayedEntry<K, V> extends DeletedDelayedEntry<K, V> {
    private UUID txnId;

    TxnDeletedDelayedEntry(K key, long storeTime, int partitionId, UUID txnId) {
        super(key, storeTime, partitionId);
        this.txnId = txnId;
    }

    @Override
    public UUID getTxnId() {
        return txnId;
    }

    @Override
    public void setTxnId(UUID txnId) {
        this.txnId = txnId;
    }

    @Override
    public boolean equals(Object o) {
        return super.equals(o);
    }

    @Override
    public int hashCode() {
        return super.hashCode();
    }

    @Override
    public String toString() {
        return "TxnDeletedDelayedEntry{" + "txnId=" + txnId + "} " + super.toString();
    }
}
